import service from "@/request/request.js"

// 获取地址
export const GetAddressInfoMessageService = (id) => {
    return service({
        method: 'GET',
        url: '/netshop/chargeaddress/',
        params: {
            id: id
        }
    })
}
// 添加收货地址
export const addAddressInfoService = (form,id) => {
    return service({
        method: 'POST',
        url: '/netshop/addAddress/',
        data: {
            ...form,
            custom_id:id,
        }
    })
}

// 编辑收货地址
export const editAddressInfoService = (form,id) => {
    return service({
        method: 'POST',
        url: '/netshop/chargeaddress/',
        data: {
            ...form,
            custom_id:id,
        }
    })
}

// 删除收货地址
export const DeleteAddressInfoMessageService = (id) => {
    return service({
        method: 'POST',
        url: '/netshop/deleteAddress/'+id+'/',
    })
}